package com.mrjy.coursepackage.dao;

import com.mrjy.common.entity.CoursePackageVideoRel;
import com.mrjy.coursepackage.dto.CoursePackageInfoDTO;
import com.mrjy.coursepackage.dto.CoursePackageVideoRelDTO;

import java.util.List;



/**
 * CoursepackageVideoRelDAO接口
 * <br>
 * <b>功能：</b>CoursepackageVideoRelDao<br>
 */
public interface ICoursePackageVideoRelDao {
	/**
	 * 新增
	 * @param rel
	 * @return
	 */
	public Integer insert(CoursePackageVideoRel rel);
	/**
	 * 全部修改，不管值是否为空
	 * @param rel
	 * @return
	 */
	public Integer update(CoursePackageVideoRel rel);
	/**
	 * 只修改不为空的值
	 * @param rel
	 * @return
	 */
	public Integer updateById(CoursePackageVideoRel rel);
	/**
	 * 删除
	 * @param id
	 * @return
	 */
	public Integer delete(Integer id);
	/**
	 * 通过id查询数据
	 * @param id
	 * @return
	 */
	public CoursePackageVideoRelDTO selectById(Integer id);
	/**
	 * 查询list
	 * @param rel
	 * @return
	 */
	public List<CoursePackageVideoRel> selectPageByEntity(CoursePackageVideoRel rel);
	
	public List<Integer> selectVideoIdListByCoursePackageId(Integer coursePackageId);
	
	public List<CoursePackageVideoRelDTO> selectPage(CoursePackageVideoRelDTO dto);
	
	public int selectCountPage(CoursePackageVideoRelDTO dto);
	
	public CoursePackageVideoRelDTO selectByCoursePackageIdAndVideoId(CoursePackageVideoRelDTO dto);
	
	public List<CoursePackageVideoRelDTO> selectCoursePackageByVideoId(CoursePackageVideoRelDTO paramDto);

    public List<CoursePackageVideoRelDTO> selectByCoursePackageId(Integer userId,Integer coursePackageId);

    public int deleteByCoursepkId(Integer id);
	public int selectByCoursePackageIdAndSort(Integer coursePackageId);

    int selectCountCoursePackageByVideoId(CoursePackageVideoRelDTO paramDto);
    
	public List<Integer> selectCoursePackageListByVideoId(Integer videoId);
}
